package com.chunwei.advert.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.chunwei.advert.common.utils.PageUtils;
import com.chunwei.advert.common.utils.Query;
import com.chunwei.advert.mapper.AdvertMapper;
import com.chunwei.advert.entity.AdvertEntity;
import com.chunwei.advert.service.AdvertService;
import org.springframework.stereotype.Service;

import java.util.Map;


@Service("advertService")
public class AdvertServiceImpl extends ServiceImpl<AdvertMapper, AdvertEntity> implements AdvertService
{

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<AdvertEntity> page = this.page(
                new Query<AdvertEntity>().getPage(params),
                new QueryWrapper<>()
        );

        return new PageUtils(page);
    }

}